package com.prb.web.service.impl;

import com.prb.api.service.HelloService;
import com.prb.api.service.WorldService;
import com.prb.web.service.WebService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

@Service
public class PoliceHelloService implements WebService {

    //@Reference(mock = "force:return 1234")
    @Reference
    private HelloService helloService;

    @Reference
    private WorldService worldService;

    public String sayHello(String name, int timeToWait) {

        String msg = worldService.sayWorld("world");
        System.out.println("msg is : " + msg);
        return helloService.sayHello(name);
        //return "haha";
    }
}
